<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>卖家-修改个人信息</title>
<link href="<?php echo $this->_webroot('/user/css/common.css'); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->_webroot('/user/css/content1.css'); ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->_webroot('/user/js/jquery-1.7.1.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->_webroot('/user/js/common.js'); ?>" type="text/javascript"></script>
<script type='text/javascript' src='<?php echo $this->_webroot('servtools/date/WdatePicker.js'); ?>'></script>

 
</head>
<body>
<psp:tags     htmlname='user_topnav1'  iconname='usertopnav1' />
<psp:tags     htmlname='user_topsearch'  iconname='usertopsearch' />

<div class="main">
	<div class="main-left">
    	<div class="title">会员管理中心</div>
        <psp:tags     htmlname='user_menulist'  iconname='usermenulist' />
    </div>
<link href="<?php echo $this->_webroot('/user/css/shoprequest.css'); ?>" rel="stylesheet" type="text/css" />   
    <div class="main-right main_right">
	

            <div class="cont">
                <div class="title_uc"><h3>员工管理</h3></div>               
	
			<table width="100%" border="0" cellspacing="0">
				<tr>
				    <th style="width:50px;">编号</th>				
				    <th style="width:150px;">员工姓名</th>
				    <th style="width:150px;">所属部门</th>                    
                    <th style="width:150px;">性别/电话</th>
                    <th style="width:50px;">简历</th>					
                    <th style="width:70px;">操作</th>
                </tr>
				<?php if(empty($address_rs)){?>
					<tr><td class="name" colspan="7">没有保存的信息</td></tr>
				<?php }else{?>
				<?php foreach($address_rs as $val){?>
				<tr class="trcolor">
                    <td class="name center "><?php echo $val['staff']['staff_num'];?></td>				
				    <td class="name">
                    <?php if($val['staff']['logo']){?><img src="<?php echo $val['staff']['logo'];?>" width="50px" height="50px" onerror="this.src='<?php echo $this->_webroot('/user/images/nopic.gif'); ?>'"/><?php  }?>				
					<br/><?php echo $val['staff']['name'];?>
					</td>
				    <td class="name"><?php echo $departmentcat[$val['staff']['department_id']];?></td>					
                    <td class="name"><?php echo $val['staff']['sex'];?>/<?php echo $val['staff']['telphone'];?></td>
                    <td class="name"><?php if($val['staff']['jobstr']){?><a href="<?php echo $val['staff']['jobstr'];?>">下载</a><?php  }?>	</td>					
                    <td class="name"><a href="<?php echo $this->_url('team/staff/');?>?address_id=<?php echo $val['staff']['id'];?>">修改</a>
					<br /><a href="<?php echo $this->_url('team/delstaff/');?>?address_id=<?php echo $val['staff']['id'];?>">删除</a>
                    </td>
				</tr>
				<?php }?>
				<?php }?>
			</table>
			
      <form action="<?php echo $this->_url('team/staff/');?>?address_id=<?php echo $address_id;?>" method="post" name="form_profile"  enctype="multipart/form-data"  onsubmit="return checkform();">
       <table id="newAddress" width="100%" border="0" cellspacing="0">
					<tr>
						<th align="left" width="30%">&nbsp;&nbsp;员工管理</th><th width="70%"><span></span></th>
					</tr>
					<tr><td class="textright">所属部门：</td>
						<td align="left">
							<select name="data[staff][department_id]">
								<option value='0'>请选择...</option>
							<?php  if(!empty($departmentcat)){
								foreach($departmentcat as $key =>$value){ ?>
								<option value='<?php echo  $key;?>' <?php if($key==$user_info['department_id']){?> selected<?php }?>><?php echo  $value;?></option>
							<?php  }
							}?>
							</select>						
						</td></tr>
					<tr><td class="textright">员工编号：</td>
						<td align="left"><input type="text" name="data[staff][staff_num]" value="<?php echo  $user_info['staff_num'];?>" maxlength="12"  onchange="if(/\D/.test(this.value)){alert('员工编号只能输入数字');this.value='';}" /></td></tr>						
					<tr><td class="textright">员工登入密码：</td>
						<td align="left"><input type="text" name="data[staff][staff_pwd]" value="<?php echo  $user_info['staff_pwd'];?>" maxlength="20" /></td></tr>					
					<tr><td class="textright">员工姓名：</td>
						<td align="left"><input type="text" name="data[staff][name]" value="<?php echo  $user_info['name'];?>" maxlength="20" /></td></tr>
					<tr><td class="textright">性别：</td>
						<td align="left">
							<select name="data[staff][sex]">
								<option value='保密'>请选择...</option>
								<option value='男'  <?php if('男'==$user_info['sex']){?> selected<?php }?> >男</option>
								<option value='女'  <?php if('女'==$user_info['sex']){?> selected<?php }?> >女</option>								
							</select>						
						</td></tr>
					<tr><td class="textright">进公司时间：</td>
						<td align="left">
						<input class="Wdate" type="text" name="data[staff][jointime]" id="end_time" onFocus="WdatePicker({isShowClear:false,readOnly:true})" value="<?php echo  $user_info['jointime'];?>" />
						</td></tr>
					<tr><td class="textright">出生年月：</td>
						<td align="left">
						<input class="Wdate" type="text" name="data[staff][birthtime]" id="end_time" onFocus="WdatePicker({isShowClear:false,readOnly:true})" value="<?php echo  $user_info['birthtime'];?>" />						
						</td></tr>					
					<tr><td class="textright">电话：</td>
						<td align="left"><input type="text" name="data[staff][telphone]" value="<?php echo  $user_info['telphone'];?>" maxlength="20" /></td></tr>
					<tr><td class="textright"><span id="picspan"><?php if($user_info['logo']){?><img src="<?php echo $user_info['logo'];?>" onerror="this.src='<?php echo $this->_webroot('/user/images/nopic.gif'); ?>'"/><?php  }else{?>员工头像<?php }?></span></td><td align="left"><input type="file" name="attach[]" onchange="showimg(this)" />
					<br />
						图片应小于1M，jpg、png或gif格式。建议为300</>x300像素	
					</td></tr>
					<tr><td class="textright">上传简历：</td>
						<td align="left">
						<input type="file" name="attach1[]" onchange="showimg(this)" />
						</td></tr>

						<input type="hidden" name="data[staff][id]" value="<?php echo  isset($user_info['id'])?$user_info['id']:'';?>" />
					<tr><td></td><td><span><input type="submit" name="submit" value="提交订单" /></span></td></tr>
				</table>

		</form>			  
			  
			  
            </div>
	
	

        

    </div>
    <div class="clear"></div>
</div>

<div class="footer">
    <psp:tags     htmlname='user_footer_helper'  iconname='userfooterhelper' />

</div>
<script language="JavaScript">
<!--
function showimg(obj) {
	var picspan = document.getElementById("picspan");
	picspan.innerHTML = '';
	var Img = new Image();
	Img.id = "goods_pic";

		if(navigator.userAgent.indexOf("MSIE")>0) {
			Img.src = obj.value;
		} else {
			Img.src = obj['files'][0].getAsDataURL();
		}

	picspan.appendChild(Img);
	//imgwh();
	setTimeout("imgwh()",100);
}

function checkform(){
		return true;
}
//-->
</script>
</body>
</html>